feat(grafana): consolidate OIDC behind ArgoCD's Dex#23
Merged
Conversation
Replace Grafana's built-in GitHub OAuth (GF_AUTH_GITHUB_*) with the generic OIDC client (GF_AUTH_GENERIC_OAUTH_*) pointing at https://argocd.makeitwork.cloud/api/dex. Same pattern Headlamp uses — one Dex, one GitHub OAuth app, one team→role mapping path. bootstrap/argocd-config.yaml — register `grafana` as a Dex static client with redirectURI https://grafana.makeitwork.cloud/login/generic_oauth. bootstrap/secrets/github-oauth-secret.yaml — add encrypted dex.grafana.clientSecret to argocd-secret. workloads/grafana/grafana.yaml — swap the GitHub OAuth env block for GF_AUTH_GENERIC_OAUTH_* against Dex's auth/token/userinfo URLs. Update ROLE_ATTRIBUTE_PATH to match Dex's `org:team` group format (was the GitHub-API-shaped `@org/team`). workloads/grafana/grafana-oidc-secret.yaml — new sops-encrypted Secret named `grafana-oidc` with GF_AUTH_GENERIC_OAUTH_CLIENT_ID=grafana and the matching CLIENT_SECRET. Replaces the old `grafana-github-oauth` Secret which is deleted. .sops.yaml — extend encrypted_regex to also cover GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Move Grafana off its built-in GitHub OAuth onto ArgoCD's embedded Dex, matching Headlamp's pattern. One Dex, one GitHub OAuth app, one team→role mapping in one place. Drops a separately-registered GitHub OAuth App (clientID `Ov23liI2Cr1ur3xnZdlj`) — that one can be removed from github.com/organizations/makeitworkcloud/settings/applications/ at your convenience.
Changes
Test plan
🤖 Generated with Claude Code